Logs usage in integration
In this section you will find information on how to use log api for your integration. Having every changes logged in our database is a powerful feature from the Core HR, that you can take benefit from.
General concept
Every time an event happens in Core HR (employee data is modified, a new library is created, a record is deleted) a log registry is stored in the system. Each log registry describes the modification that an element has been exposed too. In simpler words, a log is an action that happened against an element. A log contains the following information:
- A logId that uniquely identifies the log
- A set of fields that describe the change like:
- For data sets The fields that describe a data set field value change along with information that help pinpoint the source event of the change like: uniqueid, startDate, endDate, dataset, key, field, value, previousValue, eventClientCode and eventType
- For data sets or libraries current state The fields that describe a modified data: uniqueid, dataset and key in the case of data sets, or library, clientCode in the case of libraries. No field values, event information or modification state is present in current state logs. If you require more detail, you should rely on normal logs endpoints.
- For libraries The fields that describe a library node field value change like: startEffectDate, library, clientCode, culture, field, value and previousValue
- Information on the author that caused that change like modificationDateTime, modificationAuthor and modificationState
Overall behavior of logs endpoints
Logs are stored in sequence as soon as new data is added/modified/deleted in Core HR. Each log will contain its own id (accessible through the property logId). Given the way Core HR handles transactions in multiple threads, it is possible that not all logIds follow a perfect sequence [1, 2, 3, … n]. This doesn’t mean that there are any changes missing in the sequence. Core HR guarantees that every change has been logged correctly.
When requesting for logs, the caller shall include in the request the following parameters:
PARAMETERS | TYPE | MANDATORY | COMMENT |
---|---|---|---|
startingFromLogId | Whole number | No | The first LogID to retrieve (Defaults to 0 if empty) |
maxNumberOfLogs | Whole number | No | The maximum number of logs to retrieve per response (Defaults to 500 if empty, MAX = 1000) |
In a scenario where the caller doesn’t include any value in the startingFromLogId parameter, the system will consider the input as 0 and will return a list of logs starting from the smallest id it finds. The parameter maxNumberOfLogs determines the amount of logs to retrieve.
Querying strategies
A calling client shall implement a calling strategy like the following:
1 CALL Core HR API V2 logs 2 IF there are new logs THEN
- 2.1 PROCESS the logs
REQUEST ONLY the targeted employee dataset information (or entire employee ONLY IF the functional case demands it).
The following endpoints exist for selective information request:
• https://{your url}/api/hub/v2/employees/{UniqueID}
• https://{your url}/api/hub/v2/employees/{UniqueID}/{dataset}
• https://{your url}/api/hub/v2/libraryTypes/{libraryType}/fields
• https://{your url}/api/hub/v2/positions/{ClientCode}
• https://{your url}/api/hub/v2/positions/structure/{ClientCode}
• https://{your url}/api/hub/v2/positionassignments/{PositionClientCode}
• https://{your url}/api/hub/v2/documents/{documentId}/content
endpoints will return a HTTP 404 message if the requested element IS NOT FOUND. Please limit your calls to 1 when you find this message to prevent spamming our servers.
- 2.2 STORE the last retrieved logId
- 2.3 GO TO step 1 (using last retrieved logId + 1) 3 ELSE
- 3.1. SLEEP 1 hour Whenever a client fails in the point “2.1 PROCESS the logs”, it can just restart from step 1 and recall again the list of from that position all over. We constantly monitor the usage of our endpoints, and we reserve ourselves the right to limit abusive usage that may penalize the performance and usage experience due to excessive and irrational calls.
An important endpoint, get the last log:

Full Documentation(For customers only)
You will need to log in to the Cegid HR community
Community
Sometimes you may ask other customers or our teams about scenario, you may find information on the Community, in the transversal section.
technical documentation
Because of the density of API and variety of data reachable the technical Core HR documentation is mandatory.
Find it there: https://talentsoft.zendesk.com/hc/fr/articles/4603836902172-T%C3%A9l%C3%A9chargez-la-documentation-technique-du-Core-HR-au-format-PDF